Setting up web server
CGI, Win-CGI, ISAPI, and NSAPI can not be executed as any normal executable file,
but it must be executed under internet web server such as IIS (Microsoft Internet
Information Server), Personal Web Server (Shipped with Microsoft Windows 98 CD-ROM),
and Microsoft Peer Web Server (can be added as a service in network property of Windows
NT). The main idea of the previous web servers is the same, so that we can take any
one of them as an example to illustrate web server configurations.
PWS Personal Web Server:
PWS can be used as a test for your homepages which contains script, databases, or
CGI executables befor it can be uploaded to the Internet. PWS is also can be used
as a web server for your local intranet.
PWS Installation:
You can find Personal Web Server at Windows 98 CD-ROM in this directory: \add-ons\PWS,
and you can install it in a minimum mode.
PWS Settings:
- Run PWS and make sure that web publishing is on. If you could not find PWS icon
in system tray or at desktop you can find it at: start/programs/Microsoft Personal
Web Server/ Personal Web Server manager.
- Click advanced icon, then click Add button.
- At Directory edit box enter a directory for your CGI applications such as 'd:\delphi\cgi'.
- At Alias edit box you can write any name for this directory for example enter 'CGI'.
- Make sure that Execute access is enabled, and Read access is disabled. The purpose
of disabling Read access is to prevent other users to access your database and files
wich may be existed with CGI applications. If Read access is on, others can download
all files that existed in CGI directory using web browser if they know thier names.
Any way you can enable it while debuging if you want to put html pages in the same
directory with CGI. In real life it is recommended that to seperate executable aliases
and readable aliases.